\documentclass[9pt]{article}
\usepackage{amsmath}
\begin{document}
Read in the following dictionary:
\[\begin{array}{c| c c@{\hskip 2pt} c@{\hskip 2pt} c@{\hskip 2pt} c@{\hskip 2pt} c@{\hskip 2pt} c@{\hskip 2pt} c@{\hskip 2pt} }
 x_{8}   &  -3.0 & -6.00 x_{1} &   & +  4.00 x_{3} & -3.00 x_{4} & + 10.00 x_{5} &   & +  1.00 x_{7}\\
 x_{9}   &  1.0  &   & -9.00 x_{2} & -10.00 x_{3} & +  2.00 x_{4} & + 10.00 x_{5} & +  9.00 x_{6} & -7.00 x_{7}\\
 x_{10}   &  -3.0 & +  8.00 x_{1} & -10.00 x_{2} & +  9.00 x_{3} & -3.00 x_{4} & +  3.00 x_{5} &   & -8.00 x_{7}\\
 x_{11}   &  0.0 & +  4.00 x_{1} & -7.00 x_{2} & +  4.00 x_{3} & -6.00 x_{4} &   & -2.00 x_{6} & -8.00 x_{7}\\
 x_{12}   &  2.0 & +  6.00 x_{1} &   & +  2.00 x_{3} & -5.00 x_{4} & -7.00 x_{5} &   & +  7.00 x_{7}\\
\hline
z    &  0.0 & -4.00 x_{1} & -2.00 x_{2} & -1.00 x_{3} & -5.00 x_{4} & +  4.00 x_{5} &    &   \\
\end{array}\]
\subsection{Initialization Phase: Dual Problem Solving}
New Objective in primal was changed to : \[ \max\ \sum_{j=1}^{7}\ - x_j \] 
Primal variable $x_j$ corresponds to dual variable $y_j$ for $j = 1,\ldots,12$
Dual Dictionary (with objective changed is): 
\[\begin{array}{c| c c@{\hskip 2pt} c@{\hskip 2pt} c@{\hskip 2pt} c@{\hskip 2pt} c@{\hskip 2pt} }
 y_{1}   &  1.0 & +  6.00 y_{8} &   & -8.00 y_{10} & -4.00 y_{11} & -6.00 y_{12}\\
 y_{2}   &  1.0  &   & +  9.00 y_{9} & + 10.00 y_{10} & +  7.00 y_{11} &   \\
 y_{3}   &  1.0 & -4.00 y_{8} & + 10.00 y_{9} & -9.00 y_{10} & -4.00 y_{11} & -2.00 y_{12}\\
 y_{4}   &  1.0 & +  3.00 y_{8} & -2.00 y_{9} & +  3.00 y_{10} & +  6.00 y_{11} & +  5.00 y_{12}\\
 y_{5}   &  1.0 & -10.00 y_{8} & -10.00 y_{9} & -3.00 y_{10} &   & +  7.00 y_{12}\\
 y_{6}   &  1.0  &   & -9.00 y_{9} &   & +  2.00 y_{11} &   \\
 y_{7}   &  1.0 & -1.00 y_{8} & +  7.00 y_{9} & +  8.00 y_{10} & +  8.00 y_{11} & -7.00 y_{12}\\
\hline
z    &  -0 & +  3.00 y_{8} & -1.00 y_{9} & +  3.00 y_{10} &   & -2.00 y_{12}\\
\end{array}\]
Initialization succeeded in finding final dual dictionary with 3 pivots
\[\begin{array}{c| c c@{\hskip 2pt} c@{\hskip 2pt} c@{\hskip 2pt} c@{\hskip 2pt} c@{\hskip 2pt} }
 y_{1}   &  0.846153846154 & -1.10 y_{5} & -23.59 y_{9} & +  1.26 y_{3} & +  1.03 y_{11} & +  4.23 y_{12}\\
 y_{2}   &  1.76923076923 & +  0.51 y_{5} & + 26.95 y_{9} & -1.28 y_{3} & +  1.87 y_{11} & -6.15 y_{12}\\
 y_{10}   &  0.0769230769231 & +  0.05 y_{5} & +  1.79 y_{9} & -0.13 y_{3} & -0.51 y_{11} & -0.62 y_{12}\\
 y_{4}   &  1.46153846154 & -0.19 y_{5} & -1.23 y_{9} & -0.27 y_{3} & +  4.92 y_{11} & +  5.81 y_{12}\\
 y_{8}   &  0.0769230769231 & -0.12 y_{5} & -1.54 y_{9} & +  0.04 y_{3} & +  0.15 y_{11} & +  0.88 y_{12}\\
 y_{6}   &  1.0  &   & -9.00 y_{9} &   & +  2.00 y_{11} &   \\
 y_{7}   &  1.53846153846 & +  0.53 y_{5} & + 22.90 y_{9} & -1.06 y_{3} & +  3.74 y_{11} & -12.81 y_{12}\\
\hline
z    &  0.461538461538 & -0.19 y_{5} & -0.23 y_{9} & -0.27 y_{3} & -1.08 y_{11} & -1.19 y_{12}\\
\end{array}\]
Primal Dictionary is:
\[\begin{array}{c| c c@{\hskip 2pt} c@{\hskip 2pt} c@{\hskip 2pt} c@{\hskip 2pt} c@{\hskip 2pt} c@{\hskip 2pt} c@{\hskip 2pt} }
 x_{5}   &  0.192307692308 & +  1.10 x_{1} & -0.51 x_{2} & -0.05 x_{10} & +  0.19 x_{4} & +  0.12 x_{8} &   & -0.53 x_{7}\\
 x_{9}   &  0.230769230769 & + 23.59 x_{1} & -26.95 x_{2} & -1.79 x_{10} & +  1.23 x_{4} & +  1.54 x_{8} & +  9.00 x_{6} & -22.90 x_{7}\\
 x_{3}   &  0.269230769231 & -1.26 x_{1} & +  1.28 x_{2} & +  0.13 x_{10} & +  0.27 x_{4} & -0.04 x_{8} &   & +  1.06 x_{7}\\
 x_{11}   &  1.07692307692 & -1.03 x_{1} & -1.87 x_{2} & +  0.51 x_{10} & -4.92 x_{4} & -0.15 x_{8} & -2.00 x_{6} & -3.74 x_{7}\\
 x_{12}   &  1.19230769231 & -4.23 x_{1} & +  6.15 x_{2} & +  0.62 x_{10} & -5.81 x_{4} & -0.88 x_{8} &   & + 12.81 x_{7}\\
\hline
z    &  -0.461538461538 & -0.85 x_{1} & -1.77 x_{2} & -0.08 x_{10} & -1.46 x_{4} & -0.08 x_{8} & -1.00 x_{6} & -1.54 x_{7}\\
\end{array}\]
Primal Dictionary with original objective is:
\[\begin{array}{c| c c@{\hskip 2pt} c@{\hskip 2pt} c@{\hskip 2pt} c@{\hskip 2pt} c@{\hskip 2pt} c@{\hskip 2pt} c@{\hskip 2pt} }
 x_{5}   &  0.192307692308 & +  1.10 x_{1} & -0.51 x_{2} & -0.05 x_{10} & +  0.19 x_{4} & +  0.12 x_{8} &   & -0.53 x_{7}\\
 x_{9}   &  0.230769230769 & + 23.59 x_{1} & -26.95 x_{2} & -1.79 x_{10} & +  1.23 x_{4} & +  1.54 x_{8} & +  9.00 x_{6} & -22.90 x_{7}\\
 x_{3}   &  0.269230769231 & -1.26 x_{1} & +  1.28 x_{2} & +  0.13 x_{10} & +  0.27 x_{4} & -0.04 x_{8} &   & +  1.06 x_{7}\\
 x_{11}   &  1.07692307692 & -1.03 x_{1} & -1.87 x_{2} & +  0.51 x_{10} & -4.92 x_{4} & -0.15 x_{8} & -2.00 x_{6} & -3.74 x_{7}\\
 x_{12}   &  1.19230769231 & -4.23 x_{1} & +  6.15 x_{2} & +  0.62 x_{10} & -5.81 x_{4} & -0.88 x_{8} &   & + 12.81 x_{7}\\
\hline
z    &  0.5 & +  1.67 x_{1} & -5.33 x_{2} & -0.33 x_{10} & -4.50 x_{4} & +  0.50 x_{8} &   & -3.17 x_{7}\\
\end{array}\]
\section{Optimization Phase Simplex}
Starting Dictionary is:
\[\begin{array}{c| c c@{\hskip 2pt} c@{\hskip 2pt} c@{\hskip 2pt} c@{\hskip 2pt} c@{\hskip 2pt} c@{\hskip 2pt} c@{\hskip 2pt} }
 x_{5}   &  0.192307692308 & +  1.10 x_{1} & -0.51 x_{2} & -0.05 x_{10} & +  0.19 x_{4} & +  0.12 x_{8} &   & -0.53 x_{7}\\
 x_{9}   &  0.230769230769 & + 23.59 x_{1} & -26.95 x_{2} & -1.79 x_{10} & +  1.23 x_{4} & +  1.54 x_{8} & +  9.00 x_{6} & -22.90 x_{7}\\
 x_{3}   &  0.269230769231 & -1.26 x_{1} & +  1.28 x_{2} & +  0.13 x_{10} & +  0.27 x_{4} & -0.04 x_{8} &   & +  1.06 x_{7}\\
 x_{11}   &  1.07692307692 & -1.03 x_{1} & -1.87 x_{2} & +  0.51 x_{10} & -4.92 x_{4} & -0.15 x_{8} & -2.00 x_{6} & -3.74 x_{7}\\
 x_{12}   &  1.19230769231 & -4.23 x_{1} & +  6.15 x_{2} & +  0.62 x_{10} & -5.81 x_{4} & -0.88 x_{8} &   & + 12.81 x_{7}\\
\hline
z    &  0.5 & +  1.67 x_{1} & -5.33 x_{2} & -0.33 x_{10} & -4.50 x_{4} & +  0.50 x_{8} &   & -3.17 x_{7}\\
\end{array}\]


 $ x_{1} $ enters and $ x_{3} $ leaves 

 \[\begin{array}{c| c c@{\hskip 2pt} c@{\hskip 2pt} c@{\hskip 2pt} c@{\hskip 2pt} c@{\hskip 2pt} c@{\hskip 2pt} c@{\hskip 2pt} }
 x_{5}   &  0.428571428571 & -0.88 x_{3} & +  0.61 x_{2} & +  0.06 x_{10} & +  0.43 x_{4} & +  0.08 x_{8} &   & +  0.41 x_{7}\\
 x_{9}   &  5.28571428571 & -18.78 x_{3} & -2.88 x_{2} & +  0.61 x_{10} & +  6.29 x_{4} & +  0.82 x_{8} & +  9.00 x_{6} & -2.92 x_{7}\\
 x_{1}   &  0.214285714286 & -0.80 x_{3} & +  1.02 x_{2} & +  0.10 x_{10} & +  0.21 x_{4} & -0.03 x_{8} &   & +  0.85 x_{7}\\
 x_{11}   &  0.857142857143 & +  0.82 x_{3} & -2.92 x_{2} & +  0.41 x_{10} & -5.14 x_{4} & -0.12 x_{8} & -2.00 x_{6} & -4.61 x_{7}\\
 x_{12}   &  0.285714285714 & +  3.37 x_{3} & +  1.84 x_{2} & +  0.18 x_{10} & -6.71 x_{4} & -0.76 x_{8} &   & +  9.22 x_{7}\\
\hline
z    &  0.857142857143 & -1.33 x_{3} & -3.63 x_{2} & -0.16 x_{10} & -4.14 x_{4} & +  0.45 x_{8} &   & -1.76 x_{7}\\
\end{array}\]


 $ x_{8} $ enters and $ x_{12} $ leaves 

 \[\begin{array}{c| c c@{\hskip 2pt} c@{\hskip 2pt} c@{\hskip 2pt} c@{\hskip 2pt} c@{\hskip 2pt} c@{\hskip 2pt} c@{\hskip 2pt} }
 x_{5}   &  0.459459459459 & -0.51 x_{3} & +  0.81 x_{2} & +  0.08 x_{10} & -0.30 x_{4} & -0.11 x_{12} &   & +  1.41 x_{7}\\
 x_{9}   &  5.59459459459 & -15.14 x_{3} & -0.89 x_{2} & +  0.81 x_{10} & -0.97 x_{4} & -1.08 x_{12} & +  9.00 x_{6} & +  7.05 x_{7}\\
 x_{1}   &  0.202702702703 & -0.93 x_{3} & +  0.95 x_{2} & +  0.09 x_{10} & +  0.49 x_{4} & +  0.04 x_{12} &   & +  0.47 x_{7}\\
 x_{11}   &  0.810810810811 & +  0.27 x_{3} & -3.22 x_{2} & +  0.38 x_{10} & -4.05 x_{4} & +  0.16 x_{12} & -2.00 x_{6} & -6.11 x_{7}\\
 x_{8}   &  0.378378378378 & +  4.46 x_{3} & +  2.43 x_{2} & +  0.24 x_{10} & -8.89 x_{4} & -1.32 x_{12} &   & + 12.22 x_{7}\\
\hline
z    &  1.02702702703 & +  0.68 x_{3} & -2.54 x_{2} & -0.05 x_{10} & -8.14 x_{4} & -0.59 x_{12} &   & +  3.73 x_{7}\\
\end{array}\]


 $ x_{3} $ enters and $ x_{1} $ leaves 

 \[\begin{array}{c| c c@{\hskip 2pt} c@{\hskip 2pt} c@{\hskip 2pt} c@{\hskip 2pt} c@{\hskip 2pt} c@{\hskip 2pt} c@{\hskip 2pt} }
 x_{5}   &  0.347826086957 & +  0.55 x_{1} & +  0.29 x_{2} & +  0.03 x_{10} & -0.57 x_{4} & -0.13 x_{12} &   & +  1.14 x_{7}\\
 x_{9}   &  2.30434782609 & + 16.23 x_{1} & -16.25 x_{2} & -0.72 x_{10} & -8.87 x_{4} & -1.74 x_{12} & +  9.00 x_{6} & -0.62 x_{7}\\
 x_{3}   &  0.217391304348 & -1.07 x_{1} & +  1.01 x_{2} & +  0.10 x_{10} & +  0.52 x_{4} & +  0.04 x_{12} &   & +  0.51 x_{7}\\
 x_{11}   &  0.869565217391 & -0.29 x_{1} & -2.94 x_{2} & +  0.41 x_{10} & -3.91 x_{4} & +  0.17 x_{12} & -2.00 x_{6} & -5.97 x_{7}\\
 x_{8}   &  1.34782608696 & -4.78 x_{1} & +  6.96 x_{2} & +  0.70 x_{10} & -6.57 x_{4} & -1.13 x_{12} &   & + 14.48 x_{7}\\
\hline
z    &  1.17391304348 & -0.72 x_{1} & -1.86 x_{2} & +  0.01 x_{10} & -7.78 x_{4} & -0.57 x_{12} &   & +  4.07 x_{7}\\
\end{array}\]


 $ x_{7} $ enters and $ x_{11} $ leaves 

 \[\begin{array}{c| c c@{\hskip 2pt} c@{\hskip 2pt} c@{\hskip 2pt} c@{\hskip 2pt} c@{\hskip 2pt} c@{\hskip 2pt} c@{\hskip 2pt} }
 x_{5}   &  0.514563106796 & +  0.50 x_{1} & -0.27 x_{2} & +  0.11 x_{10} & -1.32 x_{4} & -0.10 x_{12} & -0.38 x_{6} & -0.19 x_{11}\\
 x_{9}   &  2.21359223301 & + 16.26 x_{1} & -15.94 x_{2} & -0.77 x_{10} & -8.46 x_{4} & -1.76 x_{12} & +  9.21 x_{6} & +  0.10 x_{11}\\
 x_{3}   &  0.291262135922 & -1.10 x_{1} & +  0.76 x_{2} & +  0.14 x_{10} & +  0.19 x_{4} & +  0.06 x_{12} & -0.17 x_{6} & -0.08 x_{11}\\
 x_{7}   &  0.145631067961 & -0.05 x_{1} & -0.49 x_{2} & +  0.07 x_{10} & -0.66 x_{4} & +  0.03 x_{12} & -0.33 x_{6} & -0.17 x_{11}\\
 x_{8}   &  3.45631067961 & -5.49 x_{1} & -0.18 x_{2} & +  1.68 x_{10} & -16.05 x_{4} & -0.71 x_{12} & -4.85 x_{6} & -2.42 x_{11}\\
\hline
z    &  1.76699029126 & -0.92 x_{1} & -3.86 x_{2} & +  0.29 x_{10} & -10.45 x_{4} & -0.45 x_{12} & -1.36 x_{6} & -0.68 x_{11}\\
\end{array}\]


 $ x_{10} $ enters and $ x_{9} $ leaves 

 \[\begin{array}{c| c c@{\hskip 2pt} c@{\hskip 2pt} c@{\hskip 2pt} c@{\hskip 2pt} c@{\hskip 2pt} c@{\hskip 2pt} c@{\hskip 2pt} }
 x_{5}   &  0.822784810127 & +  2.76 x_{1} & -2.49 x_{2} & -0.14 x_{9} & -2.49 x_{4} & -0.34 x_{12} & +  0.90 x_{6} & -0.18 x_{11}\\
 x_{10}   &  2.88607594937 & + 21.20 x_{1} & -20.78 x_{2} & -1.30 x_{9} & -11.03 x_{4} & -2.29 x_{12} & + 12.01 x_{6} & +  0.14 x_{11}\\
 x_{3}   &  0.683544303797 & +  1.78 x_{1} & -2.06 x_{2} & -0.18 x_{9} & -1.31 x_{4} & -0.25 x_{12} & +  1.46 x_{6} & -0.07 x_{11}\\
 x_{7}   &  0.341772151899 & +  1.39 x_{1} & -1.91 x_{2} & -0.09 x_{9} & -1.41 x_{4} & -0.13 x_{12} & +  0.48 x_{6} & -0.16 x_{11}\\
 x_{8}   &  8.30379746835 & + 30.13 x_{1} & -35.08 x_{2} & -2.19 x_{9} & -34.58 x_{4} & -4.56 x_{12} & + 15.32 x_{6} & -2.20 x_{11}\\
\hline
z    &  2.60759493671 & +  5.25 x_{1} & -9.91 x_{2} & -0.38 x_{9} & -13.66 x_{4} & -1.11 x_{12} & +  2.13 x_{6} & -0.64 x_{11}\\
\end{array}\]


 $ x_{1} $ enters and Unbounded Dictionary!


 $ x_{1} $ enters and Unbounded Dictionary!
\end{document}
